package com.sunmnet.auto.spring.mvc.variable.impl;

import com.sunmnet.auto.spring.mvc.baen.FieldSturcture;
import com.sunmnet.auto.spring.mvc.baen.TBStructure;
import com.sunmnet.auto.spring.mvc.temp.FileType;
import com.sunmnet.auto.spring.mvc.variable.IVarDeal;

public class JsmemberDeal  implements IVarDeal{
	
	public String excute(FileType type, TBStructure tb) {
		 StringBuilder sb = new StringBuilder();
			for(FieldSturcture field : tb.getFields()){
				sb.append("{field:'").append(field.getPropertyName()).append("',")
				.append("title:'").append(field.getPropertyName()).append("',")
				.append("width:100}");
		         sb.append(",\r\n");
			}
			sb.setLength(sb.length() - 3);
			return sb.toString();
	}
}
